package com.ipnc.dss.alive;

import org.apache.mina.core.session.IdleStatus;
import org.apache.mina.filter.keepalive.KeepAliveFilter;
import org.apache.mina.filter.keepalive.KeepAliveMessageFactory;

public class IIPNCKeepAliveFilter extends KeepAliveFilter {

	private static final int INTERVAL = 45;
	private static final int TIMEOUT = 15;

	public IIPNCKeepAliveFilter(KeepAliveMessageFactory messageFactory) {
		super(messageFactory, IdleStatus.BOTH_IDLE, new ExceptionHandler(),
				INTERVAL, TIMEOUT);
	}

	public IIPNCKeepAliveFilter() {
		super(new IPNCKeepAliveMessageFactoryImpl(), IdleStatus.BOTH_IDLE,
				new ExceptionHandler(), INTERVAL, TIMEOUT);
		this.setForwardEvent(false);
	}
}